import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { fetchCustomers } from '../actions'
import Departments from '../../../containers/Departments';
import TimeSelect from "../components/TimeSelect"
import Immutable from 'Immutable'
import pureRender from "pure-render-decorator"



const messages = [



]

export default class  extends Component {
  constructor(props){
    super(props)
    this.state={
      person:{
        name:"",
        age :"",
      }
    }
  }
  render() {
    const {name,age} =this.state;
    return (
      <div>
        <span>姓名:</span><input value={name} name="name" onChange={this._handleChange.bind(this)}></input>
        <span>年龄:</span><input value={age} name="age" onChange={this._handleChange.bind(this)}></input>


        <Person detail={this.state.person}></Person>

      </div>
    )
  }
  _handleChange(event){
    this.setState()


}
}
@pureRender
class Person  extends Component {
  render() {
    console.log(this.props);
    const {name,age} = this.props.detail;
      return (
        <div>
          <span>姓名:</span>
          <span>{name}</span>
          <span> age:</span>
          <span>{age}</span>
        </div>
      )
  }
}
